﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Skywave.Windows.Forms
{
    public class ListEditorListViewItemBeforeAddEventArgs : EventArgs
    {
        public ListEditorListViewItemBeforeAddEventArgs(System.Windows.Forms.ListViewItem listItem)
        {
            _ListViewItem = listItem;
        }

        private System.Windows.Forms.ListViewItem _ListViewItem;
        /// <summary>
        /// ListViewItem Property
        /// </summary>
        public System.Windows.Forms.ListViewItem ListViewItem
        {
            get { return _ListViewItem; }
        }

        /// <summary>
        /// Item Property
        /// </summary>
        public object Item
        {
            get { return (_ListViewItem == null) ? null : _ListViewItem.Tag; }
        }

    }

    public class ListEditorItemChangedEventArgs : EventArgs
    {
        /// <summary>
        /// Item Property
        /// </summary>
        public object Item
        {
            get { return _Item; }
            set { _Item = value; }
        }
        private object _Item;

        /// <summary>
        /// NewText Property
        /// </summary>
        public string NewText
        {
            get { return _NewText; }
            set { _NewText = value; }
        }
        private string _NewText;
    }
    public class ListEditorItemDeleteEventArgs : EventArgs
    {
        /// <summary>
        /// IsCanceled Property
        /// </summary>
        public bool IsCanceled
        {
            get { return _IsCanceled; }
            set { _IsCanceled = value; }
        }
        private bool _IsCanceled = false;

        /// <summary>
        /// Items Property
        /// </summary>
        public List<object> Items
        {
            get { return _Items; }
            set { _Items = value; }
        }
        private List<object> _Items;
    }
    public class ListEditorItemEditEventArgs : EventArgs
    {
        /// <summary>
        /// IsCanceled Property
        /// </summary>
        public bool IsCanceled
        {
            get { return _IsCanceled; }
            set { _IsCanceled = value; }
        }
        private bool _IsCanceled = false;

        /// <summary>
        /// Items Property
        /// </summary>
        public List<object> Items
        {
            get { return _Items; }
            set { _Items = value; }
        }
        private List<object> _Items;
    }
}
